﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;

namespace BeanOverflow.Models
{
    public class Response
    {
        //unique identifier
        public int ID { get; set; }
        //unique identifier of question it answers
        public int QuestionID { get; set; }
        //unique identifier of object such a response can be associated to another response as a comment.
        public int ParentID { get; set; }
        //user name of user who create it
        public string UserName { get; set; }
        //date and time of creation 
        public DateTime CreatedDate { get; set; }
        //last date and time of any of the fields was modified
        public DateTime LastModifiedDate { get; set; }
        //response body
        [DataType(DataType.MultilineText)]
        public string Body { get; set; }
        //number of votes
        public int Votes { get; set; }


    }
    public class ResponseDBContext : DbContext
    {
        public DbSet<Response> Responses { get; set; }
    }
}